package com.sgb.kjwl.api.service;

import com.sgb.kjwl.model.entity.BannerEntity;
import com.sgb.kjwl.model.entity.BuildPowerTypeEntity;
import com.sgb.jicai.entity.FilterEntity;
import com.sgb.kjwl.model.entity.MaterialFilterEntity;
import com.swgk.core.base.model.entity.H5ReEntity;
import com.swgk.core.view.entity.MenuEntity;
import com.sgb.kjwl.model.entity.PowerAchievedEntity;
import com.sgb.kjwl.model.entity.PowerDetailEntity;
import com.sgb.kjwl.model.entity.PowerEntity;
import com.sgb.kjwl.model.entity.PowerRequestEntity;
import com.sgb.kjwl.model.entity.PowerTalentEntity;
import com.swgk.core.base.model.entity.ListResponse;
import com.swgk.core.base.model.entity.BaseEntity;

import java.util.List;
import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

public interface PowerAPI {

    //建设力量首页banner
    @POST("v1/app/power/bannerList")
    Call<BaseEntity<List<BannerEntity>>> getBanner();

    //建设力量首页导航菜单
    @POST("v1/app/power/categoryItems")
    Call<BaseEntity<List<MenuEntity>>> getCategory();

    //建设力量首页推荐列表
    @FormUrlEncoded
    @POST("v1/app/power/recommendList")
    Call<BaseEntity<List<PowerEntity>>> getRecommendList(@Field("areaCode") String areaCode);

    //建设力量分页标题类别
    @POST("v1/app/power/category")
    Call<BaseEntity<List<BuildPowerTypeEntity>>> getPowerTypeList();

    //筛选的一级条件二级筛选条件 资质类型
    @FormUrlEncoded
    @POST("v1/app/power/qualityType")
    Call<BaseEntity<FilterEntity>> getQualityType(@Field("no") String no);

    //筛选的备案单位
    @FormUrlEncoded
    @POST("v1/app/power/recordEnters")
    Call<BaseEntity> getRecordEnters(@Field("areaCode") String areaCode);

    //筛选条件（资质类型和资质等级）
    @FormUrlEncoded
    @POST("v1/app/power/qualityType")
    Call<BaseEntity<MaterialFilterEntity>> getTypeFilter(@Field("no") String no);

    //    筛选条件（备案单位）
    @FormUrlEncoded
    @POST("v1/app/power/recordEnters")
    Call<BaseEntity<List<MaterialFilterEntity>>> getRecordFilter(@Field("areaCode") String areaCode);

    //    筛选条件（区域，省内、省外）
    @POST("v1/app/power/areaList")
    Call<BaseEntity<List<MaterialFilterEntity>>> getAreaFilter();


    //筛选后的列表
    @POST("v1/app/power/list")
    Call<BaseEntity<ListResponse<List<PowerEntity>>>> getPowerList(@Body PowerRequestEntity entity);

    //筛选后的列表
    @POST("v1/app/power/list")
    Call<BaseEntity<ListResponse<List<PowerEntity>>>> getPowerList(@Body Map entity);

    //建设力量公司详情
    @FormUrlEncoded
    @POST("v1/app/power/detail")
    Call<BaseEntity<PowerDetailEntity>> getDetail(@Field("no") String no);

    //建设力量人才详情
    @FormUrlEncoded
    @POST("v1/app/power/getTalentsByCompanyNo")
    Call<BaseEntity<ListResponse<List<PowerTalentEntity>>>> getTalentsByCompanyNo(@Field("no") String no, @Field("pageNum") int pageNum, @Field("pageSize") int pageSize);

    //建设力量工程业绩详情
    @FormUrlEncoded
    @POST("v1/app/power/getPerformanceByCompanyNo")
    Call<BaseEntity<ListResponse<List<PowerAchievedEntity>>>> getPerformanceByCompanyNo(@Field("no") String no, @Field("pageNum") int pageNum, @Field("pageSize") int pageSize);

    @FormUrlEncoded
    @POST("v1/app/common/getUrlSetting")
    Call<BaseEntity<H5ReEntity>> getUrlSetting(@Field("param") String param);
}
